package kin.controller.system;

import javax.inject.Inject;
import javax.servlet.http.HttpServletRequest;

import org.springframework.http.HttpRequest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import kin.annotation.system.Button;
import kin.annotation.system.Module;
import kin.context.system.SessionContext;
import kin.service.security.AclServiceManager;

@Controller
@Module(label="nav.acl.controller",renderToNAV=true)
@RequestMapping("/acl")
public class AclController {
	@Inject
	private AclServiceManager aclServiceManager;

	@ResponseBody
	@Module(label = "nav.acl.list", renderToNAV = true)
	@RequestMapping(value = "/list", method = RequestMethod.GET)
	public Object list(HttpServletRequest request) {
		SessionContext.getAcl(request.getSession().getId());
		return null;
	}

	@ResponseBody
	@Module(label = "nav.acl.update")
	@Button(label = "button.update")
	@RequestMapping(value = "/update", method = RequestMethod.PUT)
	public Object update() {
        
		return null;
	}

	public AclServiceManager getAclServiceManager() {
		return aclServiceManager;
	}

	public void setAclServiceManager(AclServiceManager aclServiceManager) {
		this.aclServiceManager = aclServiceManager;
	}

}
